package Util

/**
 * Created by Goland
 * User: wkk alisleepy@hotmail.com
 * Time: 2023/12/26 - 23:50
 * Desc: <常用的一些方法>
 */

// CheckParamIsNull 检查参数是否为空，为空则返回错误信息
func CheckParamIsNull(params map[string]any, keyArr []string) (bool, string) {
	for _, val := range keyArr {
		if params[val] == "" || params[val] == nil || params[val] == 0 {
			return false, "参数" + val + "不能为空"
		}
	}

	return true, "参数校验通过"
}
